<?php
/*
 * 用户操作类 user.inc.php
 * 
 * Author:2012-10-17 by wyouyu
 * 
 */
class user extends yatou
{
    function User()
    {
        parent::__construct($get,$post);
    }
    //获取用户信息
    function GetUserInfo()
    {
        
    }
    //检查用户是否存在
    function CheckUser($username,$password)
    {
        $result = $this->db->getOne('select guo_uid,guo_password from '.DBPREFIX.'member where guo_username="'.$username.'"');
        if($result)
        {
            if($result['guo_password'] == md5($password))
            {
                $this->showmsg('登陆成功,正在跳转','5','?index-homepage');
                exit();
            }
            else
            {
                $this->showmsg('账号或密码错误,请重新输入','5','');
                exit();
            }
        }
        else
        {
            $this->showmsg('账号或密码错误,请重新输入','5','');
            exit();
        }
    }
}
?>
